package cn.hznc.domain.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 库位实体类
 * @Author：Administrator
 * @Date：2023/3/29 14:50
 */
@Getter
@Setter
@Table(name = "t_inventory_location")
@TableName(value = "t_inventory_location")
public class InventoryLocationEntity{

    /**
     * 主键
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 对应仓库id
     */
    @Column(name = "warehouse_id",type = MySqlTypeConstant.INT,length = 11)
    @TableField("warehouse_id")
    private Integer warehouseId;

    /**
     * 对应仓库名
     */
    @Column(name = "warehouse_name",type = MySqlTypeConstant.VARCHAR,length = 100)
    @TableField("warehouse_name")
    private String warehouseName;

    /**
     * 库位编号
     */
    @Column(name = "location_num",type = MySqlTypeConstant.VARCHAR,length = 100)
    @TableField("location_num")
    private String locationNum;

    /**
     * 已使用库位容量
     */
    @Column(name = "use_capacity",type = MySqlTypeConstant.INT,length = 6)
    @TableField("use_capacity")
    private Integer useCapacity;

    /**
     * 库位容量
     */
    @Column(name = "capacity",type = MySqlTypeConstant.INT,length = 6)
    @TableField("capacity")
    private Integer capacity;

    /**
     * 最后更新时间
     */
    @Column(name = "last_update_time", type = MySqlTypeConstant.DATETIME, length = 0)
    @TableField("last_update_time")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date lastUpdateTime;

    /**
     * 库位状态(0:补充 ； 1：充足)
     */
    @Column(name = "status",type = MySqlTypeConstant.TINYINT)
    @TableField("status")
    private Integer status;

    /**
     * 其它参数
     */
    @Column(name = "param",type = MySqlTypeConstant.TEXT)
    @TableField("param")
    private String param;

    /**
     * 其它参数
     */
    @Column(name = "params",type = MySqlTypeConstant.TEXT)
    @TableField("params")
    private String params;

    /**
     * 所在行
     */
    @Column(name = "row",type = MySqlTypeConstant.INT , length = 3)
    @TableField("row")
    private Integer row;

    /**
     * 所在列
     */
    @Column(name = "column",type = MySqlTypeConstant.INT , length = 3)
    @TableField("column")
    private Integer column;

    /**
     * 其它参数
     */
    @TableField(exist = false)
    private Map<String,Object> paramMap;

    /**
     * 其它参数
     */
    @TableField(exist = false)
    private String partno;

    /**
     * 其它参数
     */
    @TableField(exist = false)
    private Integer safetyInventory;

    /**
     * 库位配置安全库存
     */
    @Column(name = "safety_inventory_configure_param",type = MySqlTypeConstant.TEXT)
    @TableField("safety_inventory_configure_param")
    private String safetyInventoryConfigureParam;

    /**
     * 库位配置安全库存
     */
    @Column(name = "number",type = MySqlTypeConstant.INT , length = 11)
    @TableField("number")
    private Integer number;


}
